package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysProblemNoticeMapper;
import com.ruoyi.system.domain.SysProblemNotice;
import com.ruoyi.system.service.ISysProblemNoticeService;

/**
 * 问题反馈Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-31
 */
@Service
public class SysProblemNoticeServiceImpl implements ISysProblemNoticeService 
{
    @Autowired
    private SysProblemNoticeMapper sysProblemNoticeMapper;

    /**
     * 查询问题反馈
     * 
     * @param noticeId 问题反馈主键
     * @return 问题反馈
     */
    @Override
    public SysProblemNotice selectSysProblemNoticeByNoticeId(Long noticeId)
    {
        return sysProblemNoticeMapper.selectSysProblemNoticeByNoticeId(noticeId);
    }

    /**
     * 查询问题反馈列表
     * 
     * @param sysProblemNotice 问题反馈
     * @return 问题反馈
     */
    @Override
    public List<SysProblemNotice> selectSysProblemNoticeList(SysProblemNotice sysProblemNotice)
    {
        return sysProblemNoticeMapper.selectSysProblemNoticeList(sysProblemNotice);
    }

    /**
     * 新增问题反馈
     * 
     * @param sysProblemNotice 问题反馈
     * @return 结果
     */
    @Override
    public int insertSysProblemNotice(SysProblemNotice sysProblemNotice)
    {
        sysProblemNotice.setCreateTime(DateUtils.getNowDate());
        return sysProblemNoticeMapper.insertSysProblemNotice(sysProblemNotice);
    }

    /**
     * 修改问题反馈
     * 
     * @param sysProblemNotice 问题反馈
     * @return 结果
     */
    @Override
    public int updateSysProblemNotice(SysProblemNotice sysProblemNotice)
    {
        sysProblemNotice.setUpdateTime(DateUtils.getNowDate());
        return sysProblemNoticeMapper.updateSysProblemNotice(sysProblemNotice);
    }

    /**
     * 批量删除问题反馈
     * 
     * @param noticeIds 需要删除的问题反馈主键
     * @return 结果
     */
    @Override
    public int deleteSysProblemNoticeByNoticeIds(Long[] noticeIds)
    {
        return sysProblemNoticeMapper.deleteSysProblemNoticeByNoticeIds(noticeIds);
    }

    /**
     * 删除问题反馈信息
     * 
     * @param noticeId 问题反馈主键
     * @return 结果
     */
    @Override
    public int deleteSysProblemNoticeByNoticeId(Long noticeId)
    {
        return sysProblemNoticeMapper.deleteSysProblemNoticeByNoticeId(noticeId);
    }
}
